package com.readbook.service;

import com.readbook.dao.JfscDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service
public class JfscService {
    @Autowired
    private JfscDao jfscDao;

    public List<Map<String, Object>> search_jfsc(Map<String, Object> gmap) {
        List<Map<String, Object>> list1 = jfscDao.search_jfsc(gmap);
        return list1;
    }


    public Map<String, Object> updatestate(Map<String, Object> gmap) {
        Map<String, Object> smap = new HashMap<>();
        jfscDao.updatestate(gmap);
        smap.put("result", true);
        smap.put("msg", "修改成功!");
        return smap;
    }


    public int add_jfsc(Map<String, Object> gmap) {
        return jfscDao.add_jfsc(gmap);
    }

    public int edit_jfsc(Map<String, Object> gmap) {
        return jfscDao.edit_jfsc(gmap);
    }


    public List<Map<String, Object>> search_jfdhjl(Map<String, Object> gmap) {
        List<Map<String, Object>> list1 = jfscDao.search_jfdhjl(gmap);
        return list1;
    }

    public int lingqu_jfdhjl(Map<String, Object> gmap) {
        return jfscDao.lingqu_jfdhjl(gmap);
    }


    public List<Map<String, Object>> getShangpinAll(Map<String, Object> gmap) {
        List<Map<String, Object>> list1 = jfscDao.getShangpinAll(gmap);
        return list1;
    }

    public int countShangpinAll(Map<String, Object> gmap) {
        return jfscDao.countShangpinAll(gmap);
    }


    public List<Map<String, Object>> getMyJfyCh(Map<String, Object> gmap) {
        List<Map<String, Object>> list1 = jfscDao.getMyJfyCh(gmap);
        return list1;
    }


    public int addjfdhjl(Map<String, Object> gmap) {
        return jfscDao.addjfdhjl(gmap);
    }


    public int updateJfscYdh(Map<String, Object> gmap) {
        return jfscDao.updateJfscYdh(gmap);
    }

}


